eligible for voting or not cpp program using if else statement